if and only if ni and nj are relatively prime when i ≠ j.